<script>
export default {
  computed: {
    queryFormConfig() {
      return [
        {
          type: 'input',
          label: 'input',
          key: 'query1',
          placeholder: '请输入查询选项1'
        },
        {
          type: 'custom',
          name: 'query2'
        },
        {
          type: 'select',
          label: 'select',
          key: 'query3',
          placeholder: '请选择查询选项3',
          data: this.options3
        },
        {
          label: 'daterange',
          key: 'query4',
          type: 'daterange',
          format: 'yyyy-MM-dd',
          valueFormat: 'yyyy-MM-dd'
        }
      ]
    },
    tableColumnsConfig() {
      return [
        {
          type: 'text',
          label: '表格选项1',
          key: 'table1'
        },
        {
          type: 'text',
          label: '表格选项2-width',
          width: '150px',
          key: 'table2'
        },
        {
          type: 'text',
          label: '表格选项3-align',
          key: 'table3',
          align: 'right'
        },
        {
          type: 'custom',
          label: '表格选项4-自定义插槽',
          name: 'customName'
        },
        {
          type: 'text',
          label: '表格选项5-sortable',
          key: 'table4',
          align: 'center',
          sortable: true
        },
        {
          type: 'tag',
          label: '表格选项6-tag标签',
          key: 'table5',
          align: 'center',
          dict: this.dictData
        }
      ]
    },
    formConfig() {
      return [
        {
          title: '基本信息',
          type: 'form',
          children: [
            {
              type: 'input',
              label: '填报内容1',
              key: 'code',
              placeholder: '请输入填报内容1',
              rule: [
                {
                  required: true,
                  message: '填报内容1不能为空',
                  trigger: 'blur'
                }
              ]
            },
            {
              type: 'input',
              key: 'name',
              label: '填报内容2',
              placeholder: '请输入填报内容2',
              rule: [
                {
                  required: true,
                  message: '填报内容2不能为空',
                  trigger: 'blur'
                }
              ]
            },
            {
              type: 'select',
              label: '填报内容3',
              key: 'deviceModelId',
              placeholder: '请选择填报内容3',
              data: this.formOptions
            },
            {
              type: 'input',
              key: 'principal',
              label: '填报内容4',
              placeholder: '请输入填报内容4'
            },
            {
              type: 'textarea',
              key: 'generalSituation',
              label: '填报内容5',
              placeholder: '请输入填报内容5',
              rows: 3
            }
          ]
        },
        {
          title: '使用信息',
          type: 'form',
          children: [
            {
              type: 'date',
              label: '填报内容6',
              key: 'inDate'
            },
            {
              type: 'date',
              label: '填报内容7',
              key: 'outDate'
            }
          ]
        }
      ]
    }
  }
}
</script>
